package com.yan.factory.method.simple;

public class Div implements Operation {
    @Override
    public Double calc(Double x, Double y) {
        if (y == 0) {
            throw new IllegalArgumentException("除数不能为0");
        }
        return x / y;
    }
}
